<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
<%@page import="java.util.Properties"%>
<%@page import="java.util.List"%>
<%@page import="persistency.OperatorRepository"%>
<%@page import="model.Operator"%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Display Operators'</title>
</head>
<body>

	<%
		OperatorRepository cr = new OperatorRepository();
		List<Operator> resultSet = cr.getAll();
	%>

	<table border="1" cellspacing="0" cellpadding="0">
		<tr>			
			<td>operatorId</td>
			<td>name</td>
			<td>telephone</td>
			<td>email</td>
			<td>rolcode</td>
			<td>active</td>
		</tr>
		<%
		System.out.println("RS size " + resultSet.size());
			for (Operator operator : resultSet) {
		%>
		<tr>
			<td>
				<%
					operator.getOperatorId();
				%>
			</td>
			<td>
				<%
					operator.getName();
				%>
			</td>
			<td>
				<%
					operator.getTelephone();
				%>
			</td>
			<td>
				<%
					operator.getEmail();
				%>
			</td>
			<td>
				<%
					operator.getRoleCode();
				%>
			</td>
			<td>
				<%
					operator.getActive();
				%>
			</td>
		</tr>
		<%
			}
		%>
	</table>
</body>
</html>